package com.cyss.greenball.world;

import org.jbox2d.dynamics.World;

import com.cyss.greenball.exception.GameOverException;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;

public abstract class ElementObject {

	protected BallWorld ballWorld;
	protected Paint paint;
	protected World world;

	public ElementObject(BallWorld world) {
		this.ballWorld = world;
		this.paint = new Paint();
		this.paint.setAntiAlias(true);
		this.paint.setColor(Color.GREEN);
		this.world = world.getWorld();
		world.addElementObject(this);
	}

	public abstract void instance();

	public abstract void onDraw(Canvas canvas) throws GameOverException;

}
